open(FH,"</Users/yaping/Documents/lab/project/SNP/Normal_SNP.filterCNV.txt") or die;
my @in=<FH>;
chomp(@in);
close(FH);
my @out_ag;
my @out_non_ag;
foreach my $line(@in){
	my @splitin=split "\t",$line;
	next if($splitin[1] eq "X");
	if($splitin[3] eq $splitin[4]){
		push(@out_ag,"$line\n");
		push(@out_non_ag,"$line\n");
	}
	elsif(($splitin[5] eq "A" && $splitin[6] eq "G") || ($splitin[6] eq "A" && $splitin[5] eq "G") || ($splitin[5] eq "C" && $splitin[6] eq "T") || ($splitin[6] eq "C" && $splitin[5] eq "T")){
		push(@out_ag,"$line\n");
	}
	else{
		push(@out_non_ag,"$line\n");
	}
}
open(OUT,">/Users/yaping/Documents/lab/project/SNP/Normal_SNP.filterCNV.agsnp.txt");
print OUT @out_ag;
close(OUT);
open(OUT,">/Users/yaping/Documents/lab/project/SNP/Normal_SNP.filterCNV.nonagsnp.txt");
print OUT @out_non_ag;
close(OUT)